# Angular Difference and Pythagorean Addition
Angular relation is one important setting.
A lone ultrareal has natural inner state $u$. When orientation is needed, an
inner state may be presented as:
$$
a=ue^{i\alpha}.
$$
Its reverse-oriented presentation is:
$$
a^*=ue^{-i\alpha}.
$$
The returned density is $aa^*=u^2$.
For two oriented presentations,
$$
a=ue^{i\alpha},\qquad b=ve^{i\beta},
$$
their reverse-oriented presentations are:
$$
a^*=ue^{-i\alpha},\qquad b^*=ve^{-i\beta}.
$$
The relevant quantity is not either angle alone. It is their relative
difference:
$$
\Delta=\alpha-\beta.
$$
The angular descriptor is:
$$
d(U,V)=2uv\cos\Delta.
$$
The resulting density is:
$$
|a+b|^2
=
(a+b)(a^*+b^*)
=aa^*+ab^*+ba^*+bb^*
=u^2+v^2+2uv\cos\Delta.
$$
In this angular case, the interaction descriptor is:
$$
d(U,V):=ab^*+ba^*=2uv\cos\Delta.
$$
This is upper-case term-type-aware addition:
$$
U+V=u^2+d(U,V)+v^2.
$$
## Aligned Difference
When:
$$
\Delta=0,
$$
then:
$$
\cos\Delta=1.
$$
So:
$$
U+V=(u+v)^2.
$$
This is aligned addition.
## Orthogonal Difference
When:
$$
\Delta=\frac{\pi}{2},
$$
then:
$$
\cos\Delta=0.
$$
So:
$$
U+V=u^2+v^2.
$$
This is the Pythagorean case. The relation term vanishes.
If:
$$
c^2=u^2+v^2,
$$
then:
$$
c=\sqrt{u^2+v^2}.
$$
The Pythagorean theorem is therefore recovered as zero angular relation. In
ordinary geometry that condition is called orthogonality.
## Opposed Difference
When:
$$
\Delta=\pi,
$$
then:
$$
\cos\Delta=-1.
$$
So:
$$
U+V=(u-v)^2.
$$
Opposition is a relative difference between positive inner magnitudes. It is not
a negative ultrareal.
## Law Of Cosines
The same expression recovers the law of cosines. For the sum of oriented inner
states:
$$
|u+ve^{i\Delta}|^2
=u^2+v^2+2uv\cos\Delta.
$$
For the side opposite an angle $C$, the conventional triangle formula is:
$$
c^2=u^2+v^2-2uv\cos C.
$$
The sign difference is an orientation convention. The content is the same:
the square-value depends on the relation between the parts.
## Euler's Formula
The symbol $i$ can be introduced rigorously by adjoining it to the reals with
the rule:
$$
i^2=-1.
$$
This gives the complex plane:
$$
\mathbb C=\{a+bi\mid a,b\in\mathbb R\}.
$$
Define the exponential, cosine, and sine by their convergent power series:
$$
e^x=\sum_{n=0}^{\infty}\frac{x^n}{n!},
$$
$$
\cos x=\sum_{n=0}^{\infty}(-1)^n\frac{x^{2n}}{(2n)!},
$$
and:
$$
\sin x=\sum_{n=0}^{\infty}(-1)^n\frac{x^{2n+1}}{(2n+1)!}.
$$
These series converge absolutely for every complex input, so separating the
even and odd terms is legitimate.
For real $\theta$:
$$
\begin{aligned}
e^{i\theta}
&=\sum_{n=0}^{\infty}\frac{(i\theta)^n}{n!}\\
&=\sum_{n=0}^{\infty}\frac{(i\theta)^{2n}}{(2n)!}
+\sum_{n=0}^{\infty}\frac{(i\theta)^{2n+1}}{(2n+1)!}\\
&=\sum_{n=0}^{\infty}(-1)^n\frac{\theta^{2n}}{(2n)!}
+i\sum_{n=0}^{\infty}(-1)^n
\frac{\theta^{2n+1}}{(2n+1)!}\\
&=\cos\theta+i\sin\theta.
\end{aligned}
$$
This is Euler's formula:
$$
e^{i\theta}=\cos\theta+i\sin\theta.
$$
At $\theta=\pi$:
$$
e^{i\pi}=-1,
$$
which gives the standard notation for complete opposition. At
$\theta=\pi/2$:
$$
e^{i\pi/2}=i.
$$
Thus trigonometry is compatible with the ultrareal reading: angles describe how
inner presentations differ before a positive square-value is evaluated, and the
adjoined symbol $i$ gives a rigorous notation for those turns.